#include <STC15F2K60S2.H>
#include "SiwtchHC573.h"
sbit S7 = P3^0;
sbit S6 = P3^1;
sbit S5 = P3^2;
sbit S4 = P3^3;
sbit L1 = P0^0;
unsigned char Key_num = 1;

void Delay(unsigned int t)
{
	while(t--);
}
void Keys_Scaner()
{
	//static unsigned char Key_flag = 1;
	if(S4==0)
	{
		Delay(10);
		if(S4==0) 
		{
			SwitchHC573(4);
			if(Key_num ==1)
			{
				Key_num = 2;
				L1= 0;
				while(S4==0)
				{
					L1 = 0;
				}
			}else if(Key_num ==2)
			{
				Key_num = 1;
				L1= 1;
				while(S4==0)
				{
					L1 = 1;
				}
				
			}
		}
	}SwitchHC573(0);
}